//
//  OrderRefundVC.m
//  sensen_ios
//
//  Created by mc on 16/2/27.
//  Copyright © 2016年 pro. All rights reserved.
//


//服务选择
#import "OrderRefundVC.h"


#import "PlaceholderTextView.h"

#import "OrderModel.h"


@interface OrderRefundVC ()<UITableViewDataSource, UITableViewDelegate, UITextViewDelegate,UITextFieldDelegate>

@property (nonatomic, strong) UITableView *tableView; // 表视图
@property (nonatomic, strong) NSMutableArray * dataArray;
@property (nonatomic, assign) NSInteger  type;//1. 我要退款（无需退货） 2.我要退货 0.还没有选择


@end

@implementation OrderRefundVC


- (void)viewDidLoad {
    [super viewDidLoad];
    
   
    NSMutableArray * array1 = [NSMutableArray arrayWithArray:@[@"请选择退款原因"]];
    NSArray * array = @[array1,@"",@""];
    self.dataArray = [NSMutableArray arrayWithArray:array];

    self.title = @"申请退款";
    // 创建导航栏左边返回按钮
    [self createLeftBarButtonItemWithImagename:nil];
    [self _initTableView];
    self.type = 0;
    // Do any additional setup after loading the view.
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:YES];
    // 设置导航栏颜色
    [self.navigationController.navigationBar setBackgroundImage:[UIImage imageWithColor:SS_NAVI_ORANGE_COLOR] forBarMetrics:UIBarMetricsDefault];
    // 隐藏标签栏
    MainTabBarController *main = (MainTabBarController *)self.navigationController.tabBarController;
    [main hideTabBar];
    
    
}


// 创建表视图
- (void)_initTableView {//CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT  - 64)
    _tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped];
    _tableView.backgroundColor = rgba(235, 235, 235, 1);
    _tableView.delegate = self;
    _tableView.dataSource = self;
    _tableView.scrollEnabled = YES;
    [self.view addSubview:_tableView];
}


#pragma mark - UITableViewDataSource UITableViewDelegate
// 设置组数
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 4;
}
// 设置行数
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    if (section == 0) {
        return 2;
    }else if (section == 1){
        return [[self.dataArray objectAtIndex:0] count];
    }else{
        return 1;
    }
}

// 设置单元格属性
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    
        static    NSString  * identifier = @"cell123";
        UITableViewCell  * cell = [tableView dequeueReusableCellWithIdentifier:identifier];
        if (cell == nil) {
            cell = [[UITableViewCell  alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];
        }
        cell.accessoryType = UITableViewCellAccessoryNone;
    
        for (UIView *view in cell.contentView.subviews) {
          [view removeFromSuperview];
         }
  
    if ( indexPath.section == 0) {
        UILabel * valueLable = [[UILabel alloc] init];
        [cell.contentView addSubview:valueLable];
        valueLable.font = FONT(12);
        valueLable.textColor = [UIColor darkGrayColor];
        valueLable.tag = 2000 + indexPath.row;
        [valueLable mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(cell.contentView.mas_centerY).offset(0);
            make.left.equalTo(cell.contentView).offset(10);
            make.size.mas_equalTo(CGSizeMake(160, 20));
        }];

        if (indexPath.row == 0) {
            valueLable.text = @"我要退款（无需退货）";
        }else{
            valueLable.text = @"我要退货";
        }
        
        UIButton  *selectButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [cell.contentView addSubview:selectButton];
        selectButton.tag = 1000 + indexPath.row;
        [selectButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(cell.contentView.mas_centerY).offset(0);
            make.right.equalTo(cell.contentView).offset(-10);
            make.size.mas_equalTo(CGSizeMake(20, 20));
        }];
        [selectButton setBackgroundImage:[UIImage imageNamed:@"购物车_未选中"] forState:UIControlStateNormal];
        [selectButton setBackgroundImage:[UIImage imageNamed:@"购物车_选中"] forState:UIControlStateSelected];
        [selectButton addTarget:self action:@selector(btnAction:event:) forControlEvents:UIControlEventTouchUpInside];

        
        
    }else if (indexPath.section == 1){
        
        
        
        UILabel * valueLable = [[UILabel alloc] init];
        [cell.contentView addSubview:valueLable];
        valueLable.font = FONT(12);
        valueLable.textColor = [UIColor darkGrayColor];
        valueLable.tag = 1000;
        [valueLable mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(cell.contentView.mas_centerY).offset(0);
            make.left.equalTo(cell.contentView).offset(10);
            make.size.mas_equalTo(CGSizeMake(160, 20));
        }];
        
        valueLable.text = self.dataArray[0][indexPath.row];
      
       
        UIImageView * imageView = [[UIImageView alloc] init];
        imageView.image = [UIImage imageNamed:@"论坛_进入论坛_向下"];
        [cell.contentView addSubview:imageView];
        [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(cell.contentView).offset(-10);
            make.centerY.equalTo(cell.contentView.mas_centerY).offset(0);
            make.size.mas_equalTo(CGSizeMake(20, 10));
        }];
        if (indexPath.row == 0) {
            imageView.hidden = NO;
        }else{
            imageView.hidden = YES;
        }
        
    }else if (indexPath.section == 2){
        //输入框
        UITextField   *textField = [[UITextField alloc] init];
        textField.font = FONT(15);
        textField.delegate = self;
        textField.placeholder = @"请输入退款金额";
        textField.borderStyle = UITextBorderStyleNone;
        textField.tag = 3000;
        [cell.contentView addSubview:textField];
        [textField mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(cell.contentView.mas_centerY).offset(0);
            make.left.equalTo(cell.contentView).offset(10);
            make.size.mas_equalTo(CGSizeMake(SCREEN_WIDTH - 10, 30));
        }];

        
    }else if (indexPath.section == 3){
      
        PlaceholderTextView   *textView = [[PlaceholderTextView alloc] init];
        textView.font = FONT(14);
        textView.placeholder = @"请输入退款说明";
        textView.delegate = self;
        [cell.contentView addSubview:textView];
        [textView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(cell.contentView.mas_centerY).offset(0);
            make.left.equalTo(cell.contentView).offset(10);
            make.size.mas_equalTo(CGSizeMake(SCREEN_WIDTH - 10, 30));
        }];
        textView.tag = 4000;

    }

    /* 忽略点击效果 */
    [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
    return cell;
    
}

// 设置单元格高度
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 35;
    
}
// 设置组头高度
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
    return 40;
}

-(UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
    
    UIView * header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 40)];
    
    
    UILabel * titleLable = [[UILabel alloc] init];
    titleLable.font = FONT(15);
    titleLable.textColor = [UIColor blackColor];
    titleLable.textAlignment = NSTextAlignmentLeft;
    [header addSubview:titleLable];
    [titleLable mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(header.mas_centerY);
            make.size.mas_equalTo(CGSizeMake(150, 30));
            make.left.equalTo(header).offset(5);
        }];
    CGSize size = [@"退款类型*" getSizeOfString:15];
    if (section == 0) {
       
        titleLable.attributedText = [@"退款类型*" changeText:[UIColor redColor] range:NSMakeRange(4, 1)];
        
    }else if (section == 1){
        titleLable.attributedText =[ @"退款原因*" changeText:[UIColor redColor] range:NSMakeRange(4, 1)];
        
    }else if (section == 2){
        
       
        UILabel * titleLable2 = [[UILabel alloc] init];
        titleLable2.font = FONT(15);
        titleLable2.textColor = [UIColor darkGrayColor];
        titleLable2.textAlignment = NSTextAlignmentLeft;
        [header addSubview:titleLable2];
        [titleLable2 mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(header.mas_centerY);
            make.size.mas_equalTo(CGSizeMake(150, 30));
            make.left.equalTo(header).offset(size.width + 5);
        }];
        titleLable2.text = @"最多100";
        titleLable2.text = [NSString stringWithFormat:@"最多%@",self.model.price];
        
        titleLable.attributedText = [@"退款金额*"  changeText:[UIColor redColor] range:NSMakeRange(4, 1)];
 
        
        

    }else if (section == 3){
        titleLable.attributedText = [@"退款说明(可不填)" changeText:[UIColor lightGrayColor] range:NSMakeRange(4, 5)];
        
    }

    return header;
}

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
    if (section == 3) {
        return 100;
    }
    return 5;
}


-(UIView*)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
    if (section == 3) {
        UIView *footerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, tableView.bounds.size.width, 100)];
        footerView.backgroundColor = rgba(237, 238, 239, 1);
        UIButton  * saveBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        saveBtn.frame = CGRectMake(0, _tableView.bottom, SCREEN_WIDTH, SCREEN_WIDTH / 8);
        [footerView addSubview:saveBtn];
        [saveBtn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(footerView).offset(50);
            make.centerX.equalTo(footerView.mas_centerX);
            make.size.mas_equalTo(CGSizeMake(SCREEN_WIDTH * 0.8, SCREEN_WIDTH / 12));
            
        }];
        [saveBtn setTitle:@"提交申请" forState:UIControlStateNormal];
        [saveBtn addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
        saveBtn.layer.borderColor = SS_NAVI_ORANGE_COLOR.CGColor;
        [saveBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        saveBtn.layer.borderWidth = 1;
        saveBtn.layer.masksToBounds = YES;
        saveBtn.layer.cornerRadius = 3.0;
        [saveBtn setBackgroundColor:SS_NAVI_ORANGE_COLOR];
        
        return footerView;
        
    }else{
        
        return nil;
    }
}



- (void)buttonAction:(UIButton *)button{
    
    NSMutableDictionary *  diction = [NSMutableDictionary dictionaryWithCapacity:0];
    UserModel *user = [CommonCache getUserInfo];
    [diction setObject:user.uid forKey:@"uid"];
    
    
    if (self.model.order_code != nil) {
        [diction setObject:self.model.order_code forKey:@"order_code"];
    }else{
         [SVProgressHUD showOnlyStatus:@"系统错误" withDuration:1];
    }
    
    
    
    if (self.type == 0) {
        [SVProgressHUD showOnlyStatus:@"请选择退款类型" withDuration:1];
        return;
    }
    
    UITableViewCell *cell = [_tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:1]];
    UILabel * value = [cell viewWithTag:1000];
    if ([value.text isEqualToString:@"请选择退款原因"]) {
        [SVProgressHUD showOnlyStatus:@"请选择退款原因" withDuration:1];
        return;
    }else{
        
        UITableViewCell *cell = [_tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:3]];
        PlaceholderTextView   *textView = [cell viewWithTag:4000];
        if (textView.text.length > 0) {
            [diction setObject:[NSString stringWithFormat:@"%@+%@", value.text, textView.text] forKey:@"reason"];

        }else{
            [diction setObject:value.text forKey:@"reason"];

        }
        
    }
    
    
    UITableViewCell *cell2 = [_tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:2]];
    UITextField *textField = [cell2 viewWithTag:3000];
    if ([textField.text isEqualToString:@""]) {
        [SVProgressHUD showOnlyStatus:@"请输入退款金额" withDuration:1];
        return;
    }else{
        [diction setObject:textField.text forKey:@"money"];
    }

    
   
    
    if (self.type == 0) {
        
        [SVProgressHUD showOnlyStatus:@"请选择退款类型" withDuration:1];
        return;
        
    //订单退款
    }else if (self.type == 1){
        
        NSLog(@"code = %@",diction[@"order_code"]);
        NSLog(@"money = %@", diction[@"money"]);
         [diction setObject:[NSString stringWithFormat:@"我要退款(无需退货)+%@", diction[@"reason"]] forKey:@"reason"];
        NSLog(@"reason = %@", diction[@"reason"]);
         [SVProgressHUD showWithStatus:@"订单处理中...."]; // 请求中
        [BoyeHttpClient post:@"BY_Orders_afterSale" apiVerson:100 params:diction success:^(AFHTTPRequestOperation *operation, id result) {
            [SVProgressHUD showSuccessWithStatus:result withDuration:1];
            NSLog(@"订单退款  %@", result);
             [self.navigationController popViewControllerAnimated:YES];
        } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
            
            [SVProgressHUD showErrorWithStatus:@"请求失败，请重试" withDuration:2];

        }];

     //订单退货
    }else if (self.type == 2){
       
        UserModel *user = [CommonCache getUserInfo];
        [diction setObject:user.uid forKey:@"uid"];
        [diction setObject:[NSString stringWithFormat:@"我要退货+%@", diction[@"reason"]] forKey:@"reason"];
        NSLog(@"reason = %@", diction[@"reason"]);
         [SVProgressHUD showWithStatus:@"订单处理中...."]; // 请求中
        //__weak typeof (self) weakSelf = self;
        [BoyeHttpClient post:@"BY_Orders_afterSale" apiVerson:100 params:diction success:^(AFHTTPRequestOperation *operation, id result) {
            [SVProgressHUD showSuccessWithStatus:result withDuration:1];
            NSLog(@"订单退款  %@", result);
             [self.navigationController popViewControllerAnimated:YES];
        } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
            
            
            [SVProgressHUD showErrorWithStatus:@"请求失败，请重试" withDuration:2];
            
        }];

        
    
      
        
        
    }
    
    
 
    
   
    
    
}




- (void)btnAction:(UIButton *)button event:(UIEvent*)event{
    if (button.tag == 1000) {
        UITableViewCell *cell1 = [_tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
        UITableViewCell *cell2 = [_tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:0]];
        button.selected = !button.selected;
        UIButton * button1 = (UIButton *)[cell2 viewWithTag:1001];
        button1.selected = !button.selected;
        
        UILabel * lable1 = (UILabel *)[cell1 viewWithTag:2000];
        UILabel * lable2 = (UILabel *)[cell2 viewWithTag:2001];
        lable1.textColor = SS_NAVI_ORANGE_COLOR;
        lable2.textColor = [UIColor darkGrayColor];
        
        if (button.selected) {
            lable1.textColor = SS_NAVI_ORANGE_COLOR;
            lable2.textColor = [UIColor darkGrayColor];
            self.type = 1;
        }else{
            lable2.textColor = SS_NAVI_ORANGE_COLOR;
            lable1.textColor = [UIColor darkGrayColor];
        }
        
    }else{
        UITableViewCell *cell1 = [_tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
        UITableViewCell *cell2 = [_tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:0]];
        
        button.selected = !button.selected;
        UIButton * button1 = (UIButton *)[cell1 viewWithTag:1000];
        button1.selected = !button.selected;
        
        
        UILabel * lable1 = (UILabel *)[cell1 viewWithTag:2000];
        UILabel * lable2 = (UILabel *)[cell2 viewWithTag:2001];
        lable1.textColor = [UIColor darkGrayColor];
        lable2.textColor = SS_NAVI_ORANGE_COLOR;
        
        if (!button.selected) {
            lable1.textColor = SS_NAVI_ORANGE_COLOR;
            lable2.textColor = [UIColor darkGrayColor];
        }else{
            lable2.textColor = SS_NAVI_ORANGE_COLOR;
            lable1.textColor = [UIColor darkGrayColor];
            self.type = 2;
        }

        

    }
   
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    [tableView deselectRowAtIndexPath:indexPath animated:NO];// 取消选中阴影
    
    if (indexPath.section == 0) {
        if (indexPath.row == 0) {
            UITableViewCell *cell1 = [_tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
            UITableViewCell *cell2 = [_tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:0]];
            UIButton * button1 = (UIButton *)[cell1 viewWithTag:1000];
            button1.selected = !button1.selected;
            
            UIButton * button2 = (UIButton *)[cell2 viewWithTag:1001];
            button2.selected = !button1.selected;
            
            UILabel * lable1 = (UILabel *)[cell1 viewWithTag:2000];
            UILabel * lable2 = (UILabel *)[cell2 viewWithTag:2001];
            lable1.textColor = SS_NAVI_ORANGE_COLOR;
            lable2.textColor = [UIColor darkGrayColor];
            
            if (button1.selected) {
                lable1.textColor = SS_NAVI_ORANGE_COLOR;
                lable2.textColor = [UIColor darkGrayColor];
                self.type = 1;
            }else{
                lable2.textColor = SS_NAVI_ORANGE_COLOR;
                lable1.textColor = [UIColor darkGrayColor];
            }
            
        }else{
            UITableViewCell *cell1 = [_tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
            UITableViewCell *cell2 = [_tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:0]];
            
            
            UIButton * button2 = (UIButton *)[cell2 viewWithTag:1001];
            button2.selected = !button2.selected;

            UIButton * button1 = (UIButton *)[cell1 viewWithTag:1000];
            button1.selected = !button2.selected;
            
            
            UILabel * lable1 = (UILabel *)[cell1 viewWithTag:2000];
            UILabel * lable2 = (UILabel *)[cell2 viewWithTag:2001];
            lable1.textColor = [UIColor darkGrayColor];
            lable2.textColor = SS_NAVI_ORANGE_COLOR;
            
            if (!button2.selected) {
                lable1.textColor = SS_NAVI_ORANGE_COLOR;
                lable2.textColor = [UIColor darkGrayColor];
            }else{
                lable2.textColor = SS_NAVI_ORANGE_COLOR;
                lable1.textColor = [UIColor darkGrayColor];
                self.type = 2;
            }
            
            
            
        }

    }
    
    
    
    if (indexPath.section == 1) {
        
        NSArray * array = @[@"七天无理由退换货",@"退运费",@"收到商品破损",@"少件／漏件",@"商品需要维修",@"发票问题",@"未按约定时间发货",@"假冒品牌"];
        
        NSInteger  count = [[self.dataArray objectAtIndex:0] count];
        NSMutableArray *indexPaths = [[NSMutableArray alloc] init];

        if (indexPath.row == 0 ) {
            if ( count == 1) {
                for (int i = 0; i < array.count; i++) {
                    [[self.dataArray objectAtIndex:0] insertObject:[array objectAtIndex:i] atIndex:i + 1];
                    NSIndexPath * indexPath = [NSIndexPath indexPathForRow:1 + i inSection:1];
                    [indexPaths addObject:indexPath];
                }
                [self.tableView insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationFade];

            }else{
                
                for (int i = 1; i <  count; i++) {
                    [[self.dataArray objectAtIndex: 0]  removeObjectAtIndex:count- i];
                    NSIndexPath * indexPath = [NSIndexPath indexPathForRow:count- i inSection:1];
                    [indexPaths addObject:indexPath];
                    
                }
                [self.tableView deleteRowsAtIndexPaths:indexPaths  withRowAnimation:UITableViewRowAnimationFade];
                
            }
          
        }else if (indexPath.row > 0){
            
            UITableViewCell *cell = [_tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:1]];
            UILabel * lable =  (UILabel *)[cell viewWithTag:1000];
            
            lable.text = [array objectAtIndex:indexPath.row - 1];
            
            for (int i = 1; i < count; i++) {
                [[self.dataArray objectAtIndex: 0]  removeObjectAtIndex:count- i];
                NSIndexPath * indexPath = [NSIndexPath indexPathForRow:count- i inSection:1];
                [indexPaths addObject:indexPath];

            }
            [self.tableView deleteRowsAtIndexPaths:indexPaths  withRowAnimation:UITableViewRowAnimationFade];

        }
        
    }
    
}






#pragma mark -- textViewDelegate  --
-(void)textViewDidChange:(UITextView *)textView{
    if (textView.text == nil) {
        textView.text = @"";
    }
    [self.dataArray replaceObjectAtIndex:2 withObject:textView.text];
}
-(void)textViewDidEndEditing:(UITextView *)textView{
    
    if (textView.text == nil) {
        textView.text = @"";
    }
    
    [self.dataArray replaceObjectAtIndex:2 withObject:textView.text];
}

#pragma  mark --- textFieldDelegate ---

-(BOOL)textFieldShouldReturn:(UITextField *)textField{
    [textField resignFirstResponder];
    
    return YES;
}

-(void)textFieldDidEndEditing:(UITextField *)textField{
    DLog(@" textfield   -*%@*-   ",textField.text);
    if (textField.tag != 10) {
        if (textField.text == nil) {
            textField.text = @"";
        }
        [self.dataArray  replaceObjectAtIndex:1 withObject:textField.text];
    }
    
    }




#pragma mark 分割线距离左边距离
-(void)viewDidLayoutSubviews
{
    if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) {
        [self.tableView setSeparatorInset:UIEdgeInsetsMake(0,0,0,0)];
    }
    if ([self.tableView respondsToSelector:@selector(setLayoutMargins:)]) {
        [self.tableView setLayoutMargins:UIEdgeInsetsMake(0,0,0,0)];
    }
}

-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
    if ([cell respondsToSelector:@selector(setSeparatorInset:)]) {
        [cell setSeparatorInset:UIEdgeInsetsMake(0,0,0,0)];
    }
    if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
        [cell setLayoutMargins:UIEdgeInsetsMake(0,0,0,0)];
    }
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
